<!DOCTYPE html>
<html lang="en">

<head>
	<!-- <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.0/css/bootstrap-grid.css" rel="stylesheet"> -->
	<link href="../vendor/bootstrap-grid.css" rel="stylesheet">
	<meta charset="utf-8" />
	<link rel="apple-touch-icon" sizes="76x76" href="../assets/img/favicon.ico">
	<link rel="icon" type="image/png" href="../assets/img/favicon.ico">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />



	<!-- Font Awesome Icons -->

	<!-- Main CSS -->
	<link href="../assets/css/main.css" rel="stylesheet" />

	<!-- Animation CSS -->
	<link href="../vendor/aos.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="../assets/font/iconfont.css" />
	<style>
		.tree {
			padding-top: 10px;
			border: 1px solid #ced4da;
			display: block;
			margin: auto;
			position: relative;
			padding-left: 20px;
		}

		a {
			text-decoration: none;
			color: #434b5a;
		}

		.synTree .iconxiangyou {
			cursor: pointer;
		}

		.synTree span {
			position: relative;
			top: -6px;
			left: 10px;
			color: #010102;
			cursor: default;
		}

		.leg_tree li {
			list-style-type: none;
			margin-left: -10px;
			position: relative;
			line-height: 22px;
		}

		.leg_tree li a {
			position: absolute;
			top: -4px;
			padding: 0px 10px;
		}

		.iconxiangyou {
			position: absolute;
			top: -5px;
			left: -10px;
		}

		.leg_tree li i {
			font-size: 14px;
		}

		.leg_tree li i~i:before {
			position: relative;
			top: -3px;
			left: 5px;
		}

		.tree input {
			cursor: pointer;
		}

		.tree span {
			font-size: 13px;
			cursor: pointer;
			display: inline-block;
			border: 1px solid #e2e2e2;
			width: 10px;
			line-height: 8px;
			text-align: center;
			height: 10px;
			background-color: whitesmoke;
			position: absolute;
			left: 8px;
			top: 4px;
		}

		.tree ul span {
			left: -16px;
		}

		.tree ul {
			list-style-type: none;
			margin-top: 0px;
			position: relative;
		}

		.label {
			width: 14px;
			height: 14px;
			display: inline-flex;
			border: 1px solid #a5a5a5;
			border-radius: 3px;
		}

		.label i {
			color: #0095ff;
			position: absolute;
			top: -2px;
			left: -1px;
			font-size: 18px !important;
		}

		.label:hover {
			box-shadow: 0 0 4px 0px #a0aefb;
		}

		/*.label i:hover {
			box-shadow: 0 0 4px 0px #a0aefb;
		}*/
		.isShow {
			position: absolute;
			top: -3px;
			left: -20px;
		}

		input {
			display: none;
		}

		.isShow {
			width: 14px;
			margin-right: 5px;
		}
	</style>
</head>

<body>


	<main class="container">

		<!--------------------------------------
PRICING
--------------------------------------->
		<section class="pt-4 pb-5">
			<div class="col-md-12" id="probation">
				<form id="form1" class="layui-form" lay-filter="applyMadeForm">
					<h3 class="mb-3 mt-4">订单信息</h3>
					<div class="row form-group">
						<div class="col">
							<label>订单号</label>
							<input type="text" class="form-control" disabled name="contact">
						</div>
						<div class="col">
							<label>创建时间</label>
							<input type="text" class="form-control" disabled name="phone">
						</div>
					</div>
					<div class="row form-group">
						<div class="col">
							<label>订单状态</label>
							<input type="text" class="form-control" disabled name="contact">
						</div>
						<div class="col">
							<label>申购用户</label>
							<input type="text" class="form-control" disabled name="phone">
						</div>
					</div>
					<div class="row form-group">
						<div class="col">
							<label>产品名称</label>
							<input type="text" class="form-control" disabled name="contact">
						</div>
						<div class="col">
							<label>当前价格</label>
							<input type="text" class="form-control" disabled name="phone">
						</div>
					</div>
					<div class="row form-group">
						<div class="col">
							<label>备注</label>
							<input type="text" class="form-control" disabled name="contact">
						</div>
					</div>
					<div class="row form-group">
						<div class="col">
							<label>附件</label>
							<input type="text" class="form-control" disabled name="contact">
						</div>
					</div>
					<h3 class="mb-3 mt-4">审核内容</h3>
					<div class="row form-group">
						<div class="col">
							<label class="layui-form-label">是否通过</label>
							<div class="layui-input-block">
								<input type="radio" name="aduit" value="1" title="通过" checked>
								<input type="radio" name="aduit" value="0" title="不通过">
							</div>
						</div>
					</div>
					<div class="row form-group">
						<div class="col">
							<label>审核意见</label>
							<textarea class="form-control" name="reason" rows="3" placeholder="请填写审核意见"></textarea>
						</div>
					</div>
					<button type="submit" class="btn btn-cyan btn-round text-white submitBtn"
						style="float: right;">提交</button>
				</form>
			</div>
		</section>



		<!--------------------------------------
JAVASCRIPTS
--------------------------------------->
		<script src="../vendor/jquery.min.js" type="text/javascript"></script>
		<script src="../assets/layui/layui.js" type="text/javascript"></script>
		<script src="../js/tool.js" type="text/javascript"></script>



		<script>
			$(function () {
				var dataInfo = {};
				function getUrlParam(name) {
					var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
					var r = window.location.search.substr(1).match(reg);  //匹配目标参数
					if (r != null) return unescape(r[2]); return null; //返回参数值
				}
				//获取详情
				//DataRequest();
				// function DataRequest() {
				// 	$.ajax({
       timeout:30000,
				// 		type: 'GET',
				// 		url: window.Http + "/customizeRequest/" + getUrlParam('dataId'),
				// 		headers: {
				// 			'Authorization': "Bearer " + sessionStorage.getItem('Token')
				// 		},
				// 		success: function (res) {
				// 			if (res.code == 200) {

				// 			}
				// 		}
				// 	})
				// }
				
				
				//提交
				$("body").on("click", '.submitBtn', function (e) {
					e.preventDefault();
					var data1 = layui.form.val("applyMadeForm");
					data1.productId = parent.window.productId;
					if(data1.name&&data1.contact&&data1.notice&&data1.phone){
						$.ajax({
       timeout:30000,
							url: window.Http + "/customizeRequest",
							type: 'POST',
							headers: {
								'Authorization': "Bearer " + sessionStorage.getItem('Token')
							},
							data: JSON.stringify(data1),
							contentType: "application/json",
							success: function (res) {
								if (res.code == 200) {
									layer.msg("申请成功，请等待审核！");
									setTimeout(function () {
										let index = parent.layer.getFrameIndex(window.name);
										//再执行关闭
										parent.layer.close(index);
										// parent.layer.close(2); //再执行关闭
									}, 1000)
								} else {
									layer.msg(res.msg);
								}
							}
						})
					}else{
						layer.msg("请填写表单各项必填值");
					}
				})


			})
		</script>

</body>

</html>
